#!/bin/bash
sum=$(($(ps -ajx | grep -c ./fanhong$)+0))
if [[ $sum -eq 0 ]]
then
	/home/wocao/fanhong
elif [[ $sum -gt 1 ]]
then
	for i in $(seq 2 $sum)
	do
		id=$(ps -ajx|grep ./fanhong$|sed $i,\$d|cut -d " " -f 11)
		kill $id
	done
fi

